import axios from "../utils/http";

export class CategoryApi {
  static getCategory(id: string) {
    return axios.get("/category", {
      params: { id },
    });
  }

  static getCategoryFilter(id: string) {
    return axios.get("/category/sub/filter", {
      params: {
        id,
      },
    });
  }

  // 获取导航数据
  //   data{
  //     categoryId:1005000,
  //     page:1,
  //     pageSize:20,
  //     sortField:'publishTime'|'orderNum'|'evaluateNum'
  //   }
  static getSubCategory(data: object = {}) {
    return axios.post("/category/goods/temporary", data);
  }
}
